// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './vuex/store'
import './components'               //加载公共组件
import './assets/css/animate.css'
import './assets/css/style1.0.min.css'

import { Picker } from 'mint-ui';
import { DatetimePicker } from 'mint-ui';
import 'mint-ui/lib/style.css';

import Vconsole from 'vconsole';  //移动端调试工具
if(process.env.NODE_ENV == 'development') { // 打包后隐藏 
  const  vConsole =  new Vconsole();
  Vue.use(vConsole);
}

Vue.component(Picker.name, Picker);
Vue.component(DatetimePicker.name, DatetimePicker);

Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
	// if(to.path != '/' && !sessionStorage.getItem("myInfo")){
	//   console.log(1)
	// }
	/* 路由发生变化修改页面title */
	if (to.meta.title) {
		document.title = to.meta.title;
	}
	// try {
	// 	touchTrue()
	// }catch(err) {
	// 	console.log('touchTrue false')
	// }
	next();
})

/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	store,
	components: { App },
	template: '<App/>'
})
